package com.cavy.platform.server.domain.job;

import com.cavy.platform.server.domain.message.JobRunningMessage;
import com.cavy.platform.server.domain.message.ToJson;

public interface JobAction extends ToJson {

    Job getJob();

    /**
     * 加载job详情
     *
     * @param message 消息中携带有job标识
     */
    default JobAction load(JobRunningMessage message) {
        throw new UnsupportedOperationException();
    }

    /**
     * 初始化job的状态
     */
    void initJobStatus();
}
